package com.qys.livesMall.anchor.enums;


/**
 * Created by IntelliJ IDEA.
 * User: dp
 * Date: 2023/05/16
 * Time: 14:26
 * DESCRIPTION: 主播申请状态枚举
 * @author yxh
 */
public enum AnchorApplyStatusEnum {

    AWAIT_EXAMINE(0,"待审核"),
    AWAIT_SIGN(1,"待签约"),
    COMPLETE(2,"已完成"),
    FAIL(3,"未通过"),
    ;


    /**
     * 状态码
     */
    private int code;

    /**
     * 状态码描述
     */
    private String msg;

    AnchorApplyStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static String getByCode(int code) {
        for (AnchorApplyStatusEnum type : values()) {
            if (type.getCode() == code) {
                return type.getMsg();
            }
        }
        return null;
    }

}
